[FORMAT "WCOFF"]
[INSTRSET "i486p"]
[OPTIMIZE 1]
[OPTION 1]
[BITS 32]
	EXTERN	_task_now
	EXTERN	_memman_alloc_4k
	EXTERN	_timer_alloc
	EXTERN	_timer_init
	EXTERN	_timer_settime
	EXTERN	_file_readfat
	EXTERN	_io_cli
	EXTERN	_fifo32_status
	EXTERN	_fifo32_get
	EXTERN	_io_sti
	EXTERN	_boxfill8
	EXTERN	_sheet_refresh
	EXTERN	_task_sleep
	EXTERN	_putfonts8_asc_sht
	EXTERN	_memman_total
	EXTERN	_sprintf
	EXTERN	_timer_cancel
	EXTERN	_memman_free_4k
	EXTERN	_fifo32_put
	EXTERN	_taskctl
	EXTERN	_open_console
	EXTERN	_sheet_slide
	EXTERN	_sheet_updown
	EXTERN	_open_constask
	EXTERN	_file_search
	EXTERN	_file_loadfile2
	EXTERN	_set_segmdesc
	EXTERN	_start_app
	EXTERN	_timer_cancelall
	EXTERN	_sheet_free
	EXTERN	_io_in8
	EXTERN	_io_out8
	EXTERN	_timer_free
	EXTERN	_memman_free
	EXTERN	_memman_alloc
	EXTERN	_memman_init
	EXTERN	_putfonts8_asc
	EXTERN	_sheet_alloc
	EXTERN	_sheet_setbuf
	EXTERN	_make_window8
[FILE "console.c"]
[SECTION .text]
	GLOBAL	_console_task
_console_task:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	SUB	ESP,168
	MOV	EBX,DWORD [8+EBP]
	CALL	_task_now
	PUSH	11520
	MOV	EDI,EAX
	PUSH	3932160
	CALL	_memman_alloc_4k
	TEST	EBX,EBX
	MOV	DWORD [-44+EBP],EBX
	MOV	DWORD [-176+EBP],EAX
	LEA	EAX,DWORD [-44+EBP]
	MOV	DWORD [164+EDI],EAX
	LEA	EAX,DWORD [-172+EBP]
	MOV	DWORD [184+EDI],EAX
	POP	ECX
	MOV	DWORD [-40+EBP],8
	MOV	DWORD [-36+EBP],28
	MOV	DWORD [-32+EBP],-1
	POP	ESI
	JE	L2
	CALL	_timer_alloc
	LEA	EDX,DWORD [16+EDI]
	PUSH	1
	PUSH	EDX
	MOV	DWORD [-28+EBP],EAX
	PUSH	EAX
	CALL	_timer_init
	PUSH	50
	PUSH	DWORD [-28+EBP]
	CALL	_timer_settime
	ADD	ESP,20
L2:
	PUSH	1049088
	MOV	ESI,7
	PUSH	DWORD [-176+EBP]
	CALL	_file_readfat
	POP	EAX
	POP	EDX
	XOR	EAX,EAX
L7:
	MOV	DWORD [-140+EBP+EAX*1],0
	ADD	EAX,12
	DEC	ESI
	JNS	L7
	LEA	EAX,DWORD [-140+EBP]
	MOV	DWORD [176+EDI],EAX
	MOV	EAX,DWORD [-176+EBP]
	MOV	DWORD [180+EDI],EAX
	LEA	EAX,DWORD [-44+EBP]
	MOV	BYTE [189+EDI],0
	MOV	BYTE [188+EDI],2
	PUSH	1
	PUSH	62
	PUSH	EAX
	CALL	_cons_putchar
	ADD	ESP,12
L10:
	LEA	EBX,DWORD [16+EDI]
	CALL	_io_cli
	PUSH	EBX
	CALL	_fifo32_status
	POP	ESI
	TEST	EAX,EAX
	JE	L38
	PUSH	EBX
	CALL	_fifo32_get
	MOV	ESI,EAX
	CALL	_io_sti
	POP	ECX
	CMP	ESI,1
	JLE	L39
L15:
	CMP	ESI,2
	JE	L40
L20:
	CMP	ESI,3
	JE	L41
L21:
	CMP	ESI,4
	JE	L42
L23:
	LEA	ECX,DWORD [-256+ESI]
	MOV	DWORD [-180+EBP],ECX
	CMP	ECX,255
	JA	L24
	CMP	ESI,264
	JE	L43
	CMP	ESI,266
	JE	L44
	MOV	ECX,DWORD [-40+EBP]
	CMP	ECX,239
	JG	L24
	MOV	EAX,ECX
	MOV	EDX,8
	MOV	EBX,EDX
	PUSH	1
	CDQ
	IDIV	EBX
	MOV	ECX,EAX
	MOV	EAX,ESI
	MOV	BYTE [-174+EBP+ECX*1],AL
	LEA	EAX,DWORD [-44+EBP]
	PUSH	DWORD [-180+EBP]
	PUSH	EAX
L36:
	CALL	_cons_putchar
L37:
	ADD	ESP,12
L24:
	MOV	EBX,DWORD [-44+EBP]
	TEST	EBX,EBX
	JE	L10
	MOV	ESI,DWORD [-32+EBP]
	TEST	ESI,ESI
	JS	L33
	MOV	ECX,DWORD [-36+EBP]
	MOV	EDX,DWORD [-40+EBP]
	LEA	EAX,DWORD [15+ECX]
	PUSH	EAX
	LEA	EAX,DWORD [7+EDX]
	PUSH	EAX
	PUSH	ECX
	PUSH	EDX
	PUSH	ESI
	PUSH	DWORD [4+EBX]
	PUSH	DWORD [EBX]
	CALL	_boxfill8
	ADD	ESP,28
L33:
	MOV	ECX,DWORD [-36+EBP]
	MOV	EDX,DWORD [-40+EBP]
	LEA	EAX,DWORD [16+ECX]
	PUSH	EAX
	LEA	EAX,DWORD [8+EDX]
	PUSH	EAX
	PUSH	ECX
	PUSH	EDX
	PUSH	DWORD [-44+EBP]
	CALL	_sheet_refresh
	ADD	ESP,20
	JMP	L10
L44:
	PUSH	0
	LEA	EBX,DWORD [-44+EBP]
	PUSH	32
	PUSH	EBX
	CALL	_cons_putchar
	PUSH	EBX
	MOV	EAX,DWORD [-40+EBP]
	MOV	EDX,8
	MOV	ECX,EDX
	CDQ
	IDIV	ECX
	MOV	BYTE [-174+EBP+EAX*1],0
	CALL	_cons_newline
	LEA	EAX,DWORD [-172+EBP]
	PUSH	DWORD [12+EBP]
	PUSH	DWORD [-176+EBP]
	PUSH	EBX
	PUSH	EAX
	CALL	_cons_runcmd
	ADD	ESP,32
	CMP	DWORD [-44+EBP],0
	JNE	L29
	PUSH	DWORD [-176+EBP]
	PUSH	EBX
	CALL	_cmd_exit
	POP	EAX
	POP	EDX
L29:
	PUSH	1
	PUSH	62
	PUSH	EBX
	JMP	L36
L43:
	CMP	DWORD [-40+EBP],16
	JLE	L24
	PUSH	0
	LEA	EAX,DWORD [-44+EBP]
	PUSH	32
	PUSH	EAX
	CALL	_cons_putchar
	SUB	DWORD [-40+EBP],8
	JMP	L37
L42:
	PUSH	DWORD [-176+EBP]
	LEA	EAX,DWORD [-44+EBP]
	PUSH	EAX
	CALL	_cmd_exit
	POP	ECX
	POP	EBX
	JMP	L23
L41:
	MOV	EBX,DWORD [-44+EBP]
	TEST	EBX,EBX
	JE	L22
	MOV	ECX,DWORD [-36+EBP]
	MOV	EDX,DWORD [-40+EBP]
	LEA	EAX,DWORD [15+ECX]
	PUSH	EAX
	LEA	EAX,DWORD [7+EDX]
	PUSH	EAX
	PUSH	ECX
	PUSH	EDX
	PUSH	0
	PUSH	DWORD [4+EBX]
	PUSH	DWORD [EBX]
	CALL	_boxfill8
	ADD	ESP,28
L22:
	MOV	DWORD [-32+EBP],-1
	JMP	L21
L40:
	MOV	DWORD [-32+EBP],16777215
	JMP	L20
L39:
	CMP	DWORD [-44+EBP],0
	JE	L15
	TEST	ESI,ESI
	JE	L16
	PUSH	0
	PUSH	EBX
	PUSH	DWORD [-28+EBP]
	CALL	_timer_init
	ADD	ESP,12
	CMP	DWORD [-32+EBP],0
	JS	L18
	MOV	DWORD [-32+EBP],16777215
L18:
	PUSH	50
	PUSH	DWORD [-28+EBP]
	CALL	_timer_settime
	POP	EAX
	POP	EDX
	JMP	L15
L16:
	PUSH	1
	PUSH	EBX
	PUSH	DWORD [-28+EBP]
	CALL	_timer_init
	ADD	ESP,12
	CMP	DWORD [-32+EBP],0
	JS	L18
	MOV	DWORD [-32+EBP],0
	JMP	L18
L38:
	PUSH	EDI
	CALL	_task_sleep
	CALL	_io_sti
	POP	EBX
	JMP	L10
[SECTION .data]
LC0:
	DB	" ",0x00
[SECTION .text]
	GLOBAL	_cons_putchar
_cons_putchar:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	EAX
	MOV	EAX,DWORD [12+EBP]
	MOV	DL,BYTE [16+EBP]
	MOV	EBX,DWORD [8+EBP]
	MOV	BYTE [-7+EBP],DL
	MOV	BYTE [-6+EBP],AL
	CMP	AL,9
	MOV	BYTE [-5+EBP],0
	JE	L47
	CMP	AL,10
	JE	L61
	CMP	AL,13
	JE	L45
	MOV	EDX,DWORD [EBX]
	TEST	EDX,EDX
	JNE	L62
L58:
	CMP	BYTE [-7+EBP],0
	JE	L45
	MOV	EAX,DWORD [4+EBX]
	ADD	EAX,8
	MOV	DWORD [4+EBX],EAX
	CMP	EAX,520
	JE	L61
L45:
	MOV	EBX,DWORD [-4+EBP]
	LEAVE
	RET
L61:
	PUSH	EBX
	CALL	_cons_newline
	POP	EAX
	JMP	L45
L62:
	PUSH	1
	LEA	EAX,DWORD [-6+EBP]
	PUSH	EAX
	PUSH	0
	PUSH	16777215
	PUSH	DWORD [8+EBX]
	PUSH	DWORD [4+EBX]
	PUSH	EDX
	CALL	_putfonts8_asc_sht
	ADD	ESP,28
	JMP	L58
L47:
	MOV	EAX,DWORD [EBX]
	TEST	EAX,EAX
	JNE	L63
L50:
	MOV	EAX,DWORD [4+EBX]
	ADD	EAX,8
	MOV	DWORD [4+EBX],EAX
	CMP	EAX,520
	JE	L64
L51:
	MOV	EAX,DWORD [4+EBX]
	SUB	EAX,8
	AND	EAX,31
	JNE	L47
	JMP	L45
L64:
	PUSH	EBX
	CALL	_cons_newline
	POP	EAX
	JMP	L51
L63:
	PUSH	1
	PUSH	LC0
	PUSH	0
	PUSH	16777215
	PUSH	DWORD [8+EBX]
	PUSH	DWORD [4+EBX]
	PUSH	EAX
	CALL	_putfonts8_asc_sht
	ADD	ESP,28
	JMP	L50
	GLOBAL	_cons_newline
_cons_newline:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	SUB	ESP,12
	MOV	EAX,DWORD [8+EBP]
	MOV	EAX,DWORD [EAX]
	MOV	DWORD [-16+EBP],EAX
	CALL	_task_now
	MOV	EDX,DWORD [8+EBP]
	MOV	DWORD [-20+EBP],EAX
	MOV	EAX,DWORD [8+EDX]
	CMP	EAX,459
	JG	L66
	ADD	EAX,16
	MOV	DWORD [8+EDX],EAX
L67:
	MOV	EAX,DWORD [8+EBP]
	MOV	EDX,DWORD [-20+EBP]
	MOV	DWORD [4+EAX],8
	CMP	BYTE [188+EDX],1
	JE	L98
L65:
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L98:
	CMP	BYTE [189+EDX],0
	JE	L65
	MOV	DWORD [4+EAX],16
	JMP	L65
L66:
	CMP	DWORD [-16+EBP],0
	JE	L67
	MOV	ESI,28
L78:
	MOV	EAX,DWORD [-16+EBP]
	MOV	EBX,8
	MOV	EAX,DWORD [EAX]
	MOV	DWORD [-24+EBP],EAX
L77:
	MOV	EDX,DWORD [-16+EBP]
	LEA	EAX,DWORD [16+ESI]
	MOV	EDI,DWORD [-24+EBP]
	MOV	ECX,DWORD [4+EDX]
	MOV	EDX,ESI
	IMUL	EAX,ECX
	IMUL	EDX,ECX
	LEA	EAX,DWORD [EAX+EBX*1]
	LEA	EDX,DWORD [EDX+EBX*1]
	INC	EBX
	MOV	EAX,DWORD [EDI+EAX*4]
	CMP	EBX,519
	MOV	DWORD [EDI+EDX*4],EAX
	JLE	L77
	INC	ESI
	CMP	ESI,459
	JLE	L78
	MOV	ESI,460
L88:
	MOV	EBX,8
L87:
	MOV	EDX,DWORD [-16+EBP]
	MOV	EAX,ESI
	IMUL	EAX,DWORD [4+EDX]
	LEA	EAX,DWORD [EAX+EBX*1]
	INC	EBX
	CMP	EBX,519
	MOV	DWORD [EDI+EAX*4],0
	JLE	L87
	INC	ESI
	CMP	ESI,475
	JLE	L88
	PUSH	476
	PUSH	520
	PUSH	28
	PUSH	8
	PUSH	EDX
	CALL	_sheet_refresh
	ADD	ESP,20
	JMP	L67
	GLOBAL	_cons_putstr0
_cons_putstr0:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	PUSH	EBX
	MOV	EBX,DWORD [12+EBP]
	MOV	ESI,DWORD [8+EBP]
	CMP	BYTE [EBX],0
	JNE	L104
L106:
	LEA	ESP,DWORD [-8+EBP]
	POP	EBX
	POP	ESI
	POP	EBP
	RET
L104:
	PUSH	1
	MOVSX	EAX,BYTE [EBX]
	PUSH	EAX
	INC	EBX
	PUSH	ESI
	CALL	_cons_putchar
	ADD	ESP,12
	CMP	BYTE [EBX],0
	JNE	L104
	JMP	L106
	GLOBAL	_cons_putstr1
_cons_putstr1:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	MOV	ESI,DWORD [16+EBP]
	XOR	EBX,EBX
	MOV	EDI,DWORD [12+EBP]
	CMP	EBX,ESI
	JL	L112
L114:
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L112:
	PUSH	1
	MOVSX	EAX,BYTE [EBX+EDI*1]
	PUSH	EAX
	INC	EBX
	PUSH	DWORD [8+EBP]
	CALL	_cons_putchar
	ADD	ESP,12
	CMP	EBX,ESI
	JL	L112
	JMP	L114
[SECTION .data]
LC1:
	DB	"mem",0x00
LC2:
	DB	"cls",0x00
LC3:
	DB	"dir",0x00
LC4:
	DB	"exit",0x00
LC5:
	DB	"start ",0x00
LC6:
	DB	"ncst ",0x00
LC7:
	DB	"langmode ",0x00
LC8:
	DB	0xC4,0xFA,0xCA,0xE4,0xC8,0xEB,0xC3,0xFC,0xC1,0xEE,0xB5,0xC4,0xBC,0xC8,0xB2,0xBB,0xCA,0xC7,"Wonderful",0xC4,0xDA,0xB2,0xBF,0xD6,0xB8,0xC1,0xEE,0xA3,0xAC,0xD2,0xB2,0xB2,0xBB,0xCA,0xC7,0xCD,0xE2,0xB2,0xBF,0xB3,0xCC,0xD0,0xF2,0xA1,0xA3,0x0A,0x0A,0x00
[SECTION .text]
	GLOBAL	_cons_runcmd
_cons_runcmd:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	MOV	EDI,LC1
	PUSH	EBX
	SUB	ESP,12
	MOV	EAX,DWORD [8+EBP]
	MOV	ECX,DWORD [16+EBP]
	MOV	DWORD [-24+EBP],EAX
	MOV	DWORD [-16+EBP],ECX
	MOV	EAX,DWORD [20+EBP]
	MOV	ESI,DWORD [-24+EBP]
	MOV	DWORD [-20+EBP],EAX
	MOV	EBX,DWORD [12+EBP]
	MOV	EAX,4
	CLD
	MOV	ECX,EAX
	REPE
	CMPSB
	JNE	L116
	CMP	DWORD [EBX],0
	JNE	L132
L116:
	MOV	EAX,4
	MOV	ESI,DWORD [-24+EBP]
	CLD
	MOV	EDI,LC2
	MOV	ECX,EAX
	REPE
	CMPSB
	JNE	L118
	CMP	DWORD [EBX],0
	JNE	L133
L118:
	MOV	EAX,4
	MOV	ESI,DWORD [-24+EBP]
	CLD
	MOV	EDI,LC3
	MOV	ECX,EAX
	REPE
	CMPSB
	JNE	L120
	CMP	DWORD [EBX],0
	JNE	L134
L120:
	MOV	EAX,5
	MOV	ESI,DWORD [-24+EBP]
	CLD
	MOV	EDI,LC4
	MOV	ECX,EAX
	REPE
	CMPSB
	JE	L135
	MOV	EAX,6
	MOV	ESI,DWORD [-24+EBP]
	CLD
	MOV	EDI,LC5
	MOV	ECX,EAX
	REPE
	CMPSB
	JE	L136
	MOV	EAX,5
	MOV	ESI,DWORD [-24+EBP]
	CLD
	MOV	EDI,LC6
	MOV	ECX,EAX
	REPE
	CMPSB
	JE	L137
	MOV	EAX,9
	MOV	ESI,DWORD [-24+EBP]
	CLD
	MOV	EDI,LC7
	MOV	ECX,EAX
	REPE
	CMPSB
	JE	L138
	MOV	ECX,DWORD [-24+EBP]
	CMP	BYTE [ECX],0
	JNE	L139
L115:
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L139:
	PUSH	ECX
	PUSH	DWORD [-16+EBP]
	PUSH	EBX
	CALL	_cmd_app
	ADD	ESP,12
	TEST	EAX,EAX
	JNE	L115
	MOV	DWORD [12+EBP],LC8
	MOV	DWORD [8+EBP],EBX
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	JMP	_cons_putstr0
L138:
	MOV	EAX,DWORD [-24+EBP]
	MOV	DWORD [8+EBP],EBX
	MOV	DWORD [12+EBP],EAX
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	JMP	_cmd_langmode
L137:
	MOV	EAX,DWORD [-20+EBP]
	MOV	ECX,DWORD [-24+EBP]
	MOV	DWORD [16+EBP],EAX
	MOV	DWORD [12+EBP],ECX
	MOV	DWORD [8+EBP],EBX
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	JMP	_cmd_ncst
L136:
	MOV	EAX,DWORD [-20+EBP]
	MOV	ECX,DWORD [-24+EBP]
	MOV	DWORD [16+EBP],EAX
	MOV	DWORD [12+EBP],ECX
	MOV	DWORD [8+EBP],EBX
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	JMP	_cmd_start
L135:
	MOV	EAX,DWORD [-16+EBP]
	MOV	DWORD [8+EBP],EBX
	MOV	DWORD [12+EBP],EAX
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	JMP	_cmd_exit
L134:
	MOV	DWORD [8+EBP],EBX
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	JMP	_cmd_dir
L133:
	MOV	DWORD [8+EBP],EBX
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	JMP	_cmd_cls
L132:
	MOV	EAX,DWORD [-20+EBP]
	MOV	DWORD [8+EBP],EBX
	MOV	DWORD [12+EBP],EAX
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	JMP	_cmd_mem
[SECTION .data]
LC9:
	DB	"total   %dMB",0x0A,"free %dKB",0x0A,0x0A,0x00
[SECTION .text]
	GLOBAL	_cmd_mem
_cmd_mem:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	SUB	ESP,64
	PUSH	3932160
	CALL	_memman_total
	MOV	EDX,1048576
	SHR	EAX,10
	MOV	EBX,EDX
	MOV	DWORD [ESP],EAX
	MOV	EAX,DWORD [12+EBP]
	CDQ
	IDIV	EBX
	PUSH	EAX
	LEA	EBX,DWORD [-68+EBP]
	PUSH	LC9
	PUSH	EBX
	CALL	_sprintf
	PUSH	EBX
	PUSH	DWORD [8+EBP]
	CALL	_cons_putstr0
	MOV	EBX,DWORD [-4+EBP]
	LEAVE
	RET
	GLOBAL	_cmd_cls
_cmd_cls:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	MOV	EDI,DWORD [8+EBP]
	PUSH	EBX
	MOV	EBX,28
	MOV	ECX,DWORD [EDI]
L151:
	MOV	EDX,8
	MOV	ESI,DWORD [ECX]
L150:
	MOV	EAX,EBX
	IMUL	EAX,DWORD [4+ECX]
	LEA	EAX,DWORD [EAX+EDX*1]
	INC	EDX
	CMP	EDX,519
	MOV	DWORD [ESI+EAX*4],0
	JLE	L150
	INC	EBX
	CMP	EBX,475
	JLE	L151
	PUSH	476
	PUSH	520
	PUSH	28
	PUSH	8
	PUSH	ECX
	CALL	_sheet_refresh
	MOV	DWORD [8+EDI],28
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
[SECTION .data]
LC10:
	DB	"filename.ext   %7d",0x0A,0x00
[SECTION .text]
	GLOBAL	_cmd_dir
_cmd_dir:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	XOR	ESI,ESI
	PUSH	EBX
	XOR	EBX,EBX
	SUB	ESP,32
	MOV	EDI,DWORD [8+EBP]
L169:
	MOV	AL,BYTE [1058304+EBX]
	TEST	AL,AL
	JE	L158
	CMP	AL,-27
	JE	L159
	TEST	BYTE [1058315+EBX],24
	JE	L173
L159:
	INC	ESI
	ADD	EBX,32
	CMP	ESI,223
	JLE	L169
L158:
	PUSH	EDI
	CALL	_cons_newline
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L173:
	PUSH	DWORD [1058332+EBX]
	PUSH	LC10
	LEA	EAX,DWORD [-44+EBP]
	PUSH	EAX
	CALL	_sprintf
	LEA	EDX,DWORD [1058304+EBX]
	XOR	ECX,ECX
	ADD	ESP,12
L168:
	MOV	AL,BYTE [EDX]
	INC	EDX
	MOV	BYTE [-44+EBP+ECX*1],AL
	INC	ECX
	CMP	ECX,7
	JLE	L168
	MOV	AL,BYTE [1058312+EBX]
	MOV	BYTE [-35+EBP],AL
	MOV	AL,BYTE [1058313+EBX]
	MOV	BYTE [-34+EBP],AL
	MOV	AL,BYTE [1058314+EBX]
	MOV	BYTE [-33+EBP],AL
	LEA	EAX,DWORD [-44+EBP]
	PUSH	EAX
	PUSH	EDI
	CALL	_cons_putstr0
	POP	EAX
	POP	EDX
	JMP	L159
	GLOBAL	_cmd_exit
_cmd_exit:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	PUSH	EAX
	MOV	EBX,DWORD [8+EBP]
	CALL	_task_now
	MOV	ESI,DWORD [4068]
	MOV	EDI,DWORD [4076]
	MOV	DWORD [-16+EBP],EAX
	CMP	DWORD [EBX],0
	JE	L175
	PUSH	DWORD [16+EBX]
	CALL	_timer_cancel
	POP	EAX
L175:
	PUSH	11520
	PUSH	DWORD [12+EBP]
	PUSH	3932160
	CALL	_memman_free_4k
	CALL	_io_cli
	MOV	EAX,DWORD [EBX]
	ADD	ESP,12
	TEST	EAX,EAX
	JE	L176
	SUB	EAX,ESI
	SUB	EAX,1044
	SAR	EAX,3
	IMUL	EAX,EAX,-858993459
	ADD	EAX,768
L181:
	PUSH	EAX
	PUSH	EDI
	CALL	_fifo32_put
	POP	EBX
	POP	ESI
	CALL	_io_sti
L178:
	PUSH	DWORD [-16+EBP]
	CALL	_task_sleep
	POP	ECX
	JMP	L178
L176:
	MOV	EAX,DWORD [-16+EBP]
	SUB	EAX,DWORD [_taskctl]
	SUB	EAX,4088
	SAR	EAX,6
	IMUL	EAX,EAX,-1431655765
	ADD	EAX,1024
	JMP	L181
	GLOBAL	_cmd_start
_cmd_start:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	PUSH	EDI
	PUSH	EDI
	MOV	EAX,DWORD [8+EBP]
	MOV	EDI,DWORD [12+EBP]
	MOV	ESI,DWORD [4068]
	MOV	DWORD [-16+EBP],EAX
	PUSH	DWORD [16+EBP]
	PUSH	ESI
	CALL	_open_console
	MOV	EBX,EAX
	MOV	EAX,DWORD [36+EAX]
	ADD	EAX,16
	MOV	DWORD [-20+EBP],EAX
	PUSH	4
	PUSH	32
	PUSH	EBX
	CALL	_sheet_slide
	PUSH	DWORD [16+ESI]
	PUSH	EBX
	MOV	EBX,6
	CALL	_sheet_updown
	ADD	ESP,28
	CMP	BYTE [6+EDI],0
	JNE	L187
L189:
	PUSH	266
	PUSH	DWORD [-20+EBP]
	CALL	_fifo32_put
	POP	EAX
	MOV	EAX,DWORD [-16+EBP]
	POP	EDX
	MOV	DWORD [8+EBP],EAX
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	JMP	_cons_newline
L187:
	MOVSX	EAX,BYTE [EBX+EDI*1]
	ADD	EAX,256
	INC	EBX
	PUSH	EAX
	PUSH	DWORD [-20+EBP]
	CALL	_fifo32_put
	CMP	BYTE [EBX+EDI*1],0
	POP	ECX
	POP	ESI
	JNE	L187
	JMP	L189
	GLOBAL	_cmd_ncst
_cmd_ncst:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	MOV	ESI,5
	PUSH	EBX
	PUSH	ECX
	MOV	EAX,DWORD [8+EBP]
	MOV	EBX,DWORD [12+EBP]
	MOV	DWORD [-16+EBP],EAX
	PUSH	DWORD [16+EBP]
	PUSH	0
	CALL	_open_constask
	CMP	BYTE [5+EBX],0
	LEA	EDI,DWORD [16+EAX]
	POP	EAX
	POP	EDX
	JNE	L195
L197:
	PUSH	266
	PUSH	EDI
	CALL	_fifo32_put
	POP	EAX
	MOV	EAX,DWORD [-16+EBP]
	POP	EDX
	MOV	DWORD [8+EBP],EAX
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	JMP	_cons_newline
L195:
	MOVSX	EAX,BYTE [ESI+EBX*1]
	ADD	EAX,256
	INC	ESI
	PUSH	EAX
	PUSH	EDI
	CALL	_fifo32_put
	CMP	BYTE [ESI+EBX*1],0
	POP	ECX
	POP	EAX
	JNE	L195
	JMP	L197
[SECTION .data]
LC11:
	DB	"mode number error.",0x0A,0x00
[SECTION .text]
	GLOBAL	_cmd_langmode
_cmd_langmode:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	PUSH	EBX
	MOV	EBX,DWORD [12+EBP]
	MOV	ESI,DWORD [8+EBP]
	CALL	_task_now
	MOV	DL,BYTE [9+EBX]
	SUB	EDX,48
	CMP	DL,2
	JA	L199
	MOV	BYTE [188+EAX],DL
L200:
	MOV	DWORD [8+EBP],ESI
	LEA	ESP,DWORD [-8+EBP]
	POP	EBX
	POP	ESI
	POP	EBP
	JMP	_cons_newline
L199:
	PUSH	LC11
	PUSH	ESI
	CALL	_cons_putstr0
	POP	EBX
	POP	EAX
	JMP	L200
[SECTION .data]
LC12:
	DB	"Hari",0x00
LC13:
	DB	0xB8,0xC3,0xB3,0xCC,0xD0,0xF2,0xB8,0xF1,0xCA,0xBD,0xB2,0xBB,0xD5,0xFD,0xC8,0xB7,".",0x0A,0x00
[SECTION .text]
	GLOBAL	_cmd_app
_cmd_app:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	XOR	ESI,ESI
	PUSH	EBX
	SUB	ESP,52
	MOV	EBX,DWORD [16+EBP]
	CALL	_task_now
	MOV	DWORD [-56+EBP],EAX
L207:
	MOV	AL,BYTE [ESI+EBX*1]
	CMP	AL,32
	JLE	L203
	MOV	BYTE [-44+EBP+ESI*1],AL
	INC	ESI
	CMP	ESI,12
	JLE	L207
L203:
	PUSH	224
	LEA	EBX,DWORD [-44+EBP]
	PUSH	1058304
	PUSH	EBX
	MOV	BYTE [-44+EBP+ESI*1],0
	CALL	_file_search
	ADD	ESP,12
	MOV	EDX,EAX
	TEST	EAX,EAX
	JE	L237
L236:
	MOV	EAX,DWORD [28+EDX]
	MOV	DWORD [-48+EBP],EAX
	LEA	EAX,DWORD [-48+EBP]
	PUSH	DWORD [12+EBP]
	PUSH	EAX
	MOVZX	EAX,WORD [26+EDX]
	PUSH	EAX
	CALL	_file_loadfile2
	ADD	ESP,12
	CMP	DWORD [-48+EBP],35
	MOV	DWORD [-52+EBP],EAX
	JLE	L210
	MOV	ESI,EAX
	MOV	EDI,LC12
	CLD
	ADD	ESI,4
	MOV	ECX,4
	REPE
	CMPSB
	JNE	L210
	MOV	EAX,DWORD [-52+EBP]
	CMP	BYTE [EAX],0
	JE	L238
L210:
	PUSH	LC13
	PUSH	DWORD [8+EBP]
	CALL	_cons_putstr0
	POP	EAX
	POP	EDX
L228:
	PUSH	DWORD [-48+EBP]
	PUSH	DWORD [-52+EBP]
	PUSH	3932160
	CALL	_memman_free_4k
	PUSH	DWORD [8+EBP]
	CALL	_cons_newline
	MOV	EAX,1
L201:
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L238:
	MOV	EDX,DWORD [EAX]
	MOV	EAX,DWORD [12+EAX]
	MOV	DWORD [-60+EBP],EDX
	MOV	DWORD [-64+EBP],EAX
	MOV	EDX,DWORD [-52+EBP]
	MOV	EBX,DWORD [16+EDX]
	MOV	ESI,DWORD [20+EDX]
	PUSH	DWORD [-60+EBP]
	PUSH	3932160
	CALL	_memman_alloc_4k
	MOV	EDI,EAX
	MOV	EAX,DWORD [-56+EBP]
	MOV	DWORD [168+EAX],EDI
	MOV	EAX,DWORD [-48+EBP]
	PUSH	16634
	DEC	EAX
	PUSH	DWORD [-52+EBP]
	PUSH	EAX
	MOV	EAX,DWORD [-56+EBP]
	ADD	EAX,148
	PUSH	EAX
	CALL	_set_segmdesc
	MOV	EAX,DWORD [-60+EBP]
	PUSH	16626
	DEC	EAX
	PUSH	EDI
	PUSH	EAX
	MOV	EAX,DWORD [-56+EBP]
	ADD	EAX,156
	PUSH	EAX
	CALL	_set_segmdesc
	ADD	ESP,40
	TEST	EBX,EBX
	JLE	L231
	MOV	EAX,DWORD [-52+EBP]
	MOV	ECX,DWORD [-64+EBP]
	ADD	ECX,EDI
	LEA	EDX,DWORD [EAX+ESI*1]
	MOV	ESI,EBX
L215:
	MOV	AL,BYTE [EDX]
	INC	EDX
	MOV	BYTE [ECX],AL
	INC	ECX
	DEC	ESI
	JNE	L215
L231:
	MOV	EAX,DWORD [-56+EBP]
	MOV	ESI,255
	ADD	EAX,48
	PUSH	EAX
	PUSH	12
	PUSH	DWORD [-64+EBP]
	PUSH	4
	PUSH	27
	CALL	_start_app
	MOV	EBX,DWORD [4068]
	ADD	ESP,20
	ADD	EBX,1044
L221:
	MOV	EAX,DWORD [28+EBX]
	AND	EAX,17
	CMP	EAX,17
	JE	L239
L218:
	ADD	EBX,40
	DEC	ESI
	JNS	L221
	XOR	EBX,EBX
	MOV	ESI,7
L227:
	MOV	EDX,DWORD [-56+EBP]
	MOV	EAX,DWORD [176+EDX]
	CMP	DWORD [EAX+EBX*1],0
	JNE	L240
L224:
	ADD	EBX,12
	DEC	ESI
	JNS	L227
	MOV	EAX,DWORD [-56+EBP]
	ADD	EAX,16
	PUSH	EAX
	CALL	_timer_cancelall
	PUSH	DWORD [-60+EBP]
	PUSH	EDI
	PUSH	3932160
	CALL	_memman_free_4k
	ADD	ESP,16
	MOV	EAX,DWORD [-56+EBP]
	MOV	BYTE [189+EAX],0
	JMP	L228
L240:
	PUSH	DWORD [4+EAX+EBX*1]
	MOV	EAX,DWORD [176+EDX]
	PUSH	DWORD [EAX+EBX*1]
	PUSH	3932160
	CALL	_memman_free_4k
	ADD	ESP,12
	MOV	EDX,DWORD [-56+EBP]
	MOV	EAX,DWORD [176+EDX]
	MOV	DWORD [EAX+EBX*1],0
	JMP	L224
L239:
	MOV	EDX,DWORD [-56+EBP]
	CMP	DWORD [36+EBX],EDX
	JNE	L218
	PUSH	EBX
	CALL	_sheet_free
	POP	ECX
	JMP	L218
L237:
	CMP	BYTE [-45+EBP+ESI*1],46
	JE	L208
	PUSH	224
	PUSH	1058304
	PUSH	EBX
	MOV	BYTE [-44+EBP+ESI*1],46
	MOV	BYTE [-43+EBP+ESI*1],72
	MOV	BYTE [-42+EBP+ESI*1],82
	MOV	BYTE [-41+EBP+ESI*1],66
	MOV	BYTE [-40+EBP+ESI*1],0
	CALL	_file_search
	ADD	ESP,12
	MOV	EDX,EAX
L208:
	TEST	EDX,EDX
	JNE	L236
	XOR	EAX,EAX
	JMP	L201
	GLOBAL	_hrb_api
_hrb_api:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	SUB	ESP,20
	MOV	ESI,DWORD [28+EBP]
	CALL	_task_now
	MOV	ECX,DWORD [4068]
	CMP	ESI,1
	MOV	DWORD [-16+EBP],EAX
	MOV	DWORD [-24+EBP],ECX
	MOV	EAX,DWORD [168+EAX]
	MOV	EDX,DWORD [-16+EBP]
	MOV	DWORD [-20+EBP],EAX
	MOV	EAX,DWORD [4076]
	MOV	EBX,DWORD [164+EDX]
	MOV	DWORD [-28+EBP],EAX
	JE	L355
	CMP	ESI,2
	JE	L356
	CMP	ESI,3
	JE	L357
	CMP	ESI,4
	JE	L358
	CMP	ESI,5
	JE	L359
	CMP	ESI,6
	JE	L360
	CMP	ESI,7
	JE	L361
	CMP	ESI,8
	JE	L362
	CMP	ESI,9
	JE	L363
	CMP	ESI,10
	JE	L364
	CMP	ESI,11
	JE	L365
	CMP	ESI,12
	JE	L366
	CMP	ESI,13
	JE	L367
	CMP	ESI,14
	JE	L368
	CMP	ESI,15
	JE	L277
	CMP	ESI,16
	JE	L369
	CMP	ESI,17
	JE	L370
	CMP	ESI,18
	JE	L371
	CMP	ESI,19
	JE	L372
	CMP	ESI,20
	JE	L373
	CMP	ESI,21
	JE	L374
	CMP	ESI,22
	JE	L375
	CMP	ESI,23
	JE	L376
	CMP	ESI,24
	JE	L377
	CMP	ESI,25
	JE	L378
	CMP	ESI,26
	JE	L379
	CMP	ESI,27
	JE	L380
L243:
	XOR	EAX,EAX
L241:
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L380:
	MOV	EBX,DWORD [-16+EBP]
	MOVZX	EAX,BYTE [188+EBX]
L348:
	MOV	DWORD [68+EBP],EAX
	JMP	L243
L379:
	XOR	ESI,ESI
L338:
	MOV	ECX,DWORD [-16+EBP]
	MOV	EDX,DWORD [24+EBP]
	ADD	EDX,DWORD [-20+EBP]
	MOV	EAX,DWORD [184+ECX]
	MOV	AL,BYTE [ESI+EAX*1]
	MOV	BYTE [ESI+EDX*1],AL
	MOV	EAX,DWORD [184+ECX]
	CMP	BYTE [ESI+EAX*1],0
	JE	L339
	CMP	ESI,DWORD [32+EBP]
	JGE	L339
	INC	ESI
	JMP	L338
L339:
	MOV	DWORD [68+EBP],ESI
	JMP	L243
L378:
	XOR	ESI,ESI
	MOV	EBX,DWORD [36+EBP]
	CMP	ESI,DWORD [32+EBP]
	JGE	L339
L335:
	MOV	ECX,DWORD [8+EBX]
	CMP	ECX,DWORD [4+EBX]
	JE	L339
	MOV	EAX,DWORD [24+EBP]
	MOV	EDX,DWORD [EBX]
	ADD	EAX,DWORD [-20+EBP]
	MOV	DL,BYTE [ECX+EDX*1]
	MOV	BYTE [ESI+EAX*1],DL
	INC	ESI
	INC	DWORD [8+EBX]
	CMP	ESI,DWORD [32+EBP]
	JL	L335
	JMP	L339
L377:
	MOV	EBX,DWORD [36+EBP]
	CMP	DWORD [32+EBP],0
	JNE	L323
	MOV	EAX,DWORD [4+EBX]
	JMP	L348
L323:
	CMP	DWORD [32+EBP],1
	JE	L381
	CMP	DWORD [32+EBP],2
	JNE	L243
	MOV	EAX,DWORD [8+EBX]
	SUB	EAX,DWORD [4+EBX]
	JMP	L348
L381:
	MOV	EAX,DWORD [8+EBX]
	JMP	L348
L376:
	MOV	EBX,DWORD [36+EBP]
	CMP	DWORD [32+EBP],0
	JE	L347
	CMP	DWORD [32+EBP],1
	JE	L382
	CMP	DWORD [32+EBP],2
	JE	L383
L315:
	CMP	DWORD [8+EBX],0
	JS	L384
L319:
	MOV	EAX,DWORD [4+EBX]
	CMP	DWORD [8+EBX],EAX
	JLE	L243
	MOV	DWORD [8+EBX],EAX
	JMP	L243
L384:
	MOV	DWORD [8+EBX],0
	JMP	L319
L383:
	MOV	EAX,DWORD [4+EBX]
	ADD	DWORD [24+EBP],EAX
L347:
	MOV	EDX,DWORD [24+EBP]
	MOV	DWORD [8+EBX],EDX
	JMP	L315
L382:
	MOV	ECX,DWORD [24+EBP]
	ADD	DWORD [8+EBX],ECX
	JMP	L315
L375:
	MOV	EBX,DWORD [36+EBP]
	PUSH	DWORD [4+EBX]
	PUSH	DWORD [EBX]
	PUSH	3932160
	CALL	_memman_free_4k
	MOV	DWORD [EBX],0
L349:
	ADD	ESP,12
	JMP	L243
L374:
	XOR	ESI,ESI
	XOR	EAX,EAX
L307:
	MOV	ECX,DWORD [-16+EBP]
	MOV	EDX,DWORD [176+ECX]
	CMP	DWORD [EDX+EAX*1],0
	JE	L303
	INC	ESI
	ADD	EAX,12
	CMP	ESI,7
	JLE	L307
L303:
	IMUL	EAX,ESI,12
	MOV	DWORD [68+EBP],0
	LEA	EBX,DWORD [EAX+EDX*1]
	CMP	ESI,7
	JG	L243
	MOV	EAX,DWORD [24+EBP]
	PUSH	224
	ADD	EAX,DWORD [-20+EBP]
	PUSH	1058304
	PUSH	EAX
	CALL	_file_search
	ADD	ESP,12
	MOV	EDX,EAX
	TEST	EAX,EAX
	JE	L243
	MOV	DWORD [68+EBP],EBX
	MOV	EAX,DWORD [28+EAX]
	MOV	DWORD [4+EBX],EAX
	MOV	EAX,DWORD [-16+EBP]
	MOV	DWORD [8+EBX],0
	PUSH	DWORD [180+EAX]
	LEA	EAX,DWORD [4+EBX]
	PUSH	EAX
	MOVZX	EAX,WORD [26+EDX]
	PUSH	EAX
	CALL	_file_loadfile2
	MOV	DWORD [EBX],EAX
	JMP	L349
L373:
	MOV	EDX,DWORD [36+EBP]
	TEST	EDX,EDX
	JNE	L298
	PUSH	97
	CALL	_io_in8
	MOV	ESI,EAX
	AND	ESI,13
	PUSH	ESI
	PUSH	97
	CALL	_io_out8
	JMP	L349
L298:
	MOV	ECX,1193180000
	MOV	EBX,EDX
	MOV	EAX,ECX
	PUSH	182
	CDQ
	IDIV	EBX
	PUSH	67
	MOV	ESI,EAX
	CALL	_io_out8
	MOV	EAX,ESI
	SAR	ESI,8
	AND	EAX,255
	PUSH	EAX
	PUSH	66
	CALL	_io_out8
	PUSH	ESI
	PUSH	66
	CALL	_io_out8
	PUSH	97
	CALL	_io_in8
	MOV	ESI,EAX
	OR	ESI,3
	AND	ESI,15
	PUSH	ESI
	PUSH	97
	CALL	_io_out8
	ADD	ESP,36
	JMP	L243
L372:
	PUSH	DWORD [24+EBP]
	CALL	_timer_free
L350:
	POP	EBX
	JMP	L243
L371:
	PUSH	DWORD [36+EBP]
	PUSH	DWORD [24+EBP]
	CALL	_timer_settime
L352:
	POP	ESI
	POP	EDI
	JMP	L243
L370:
	MOV	EAX,DWORD [36+EBP]
	ADD	EAX,256
	PUSH	EAX
	MOV	EAX,DWORD [-16+EBP]
	ADD	EAX,16
	PUSH	EAX
	PUSH	DWORD [24+EBP]
	CALL	_timer_init
	JMP	L349
L369:
	CALL	_timer_alloc
	MOV	DWORD [68+EBP],EAX
	MOV	BYTE [9+EAX],1
	JMP	L243
L277:
	CALL	_io_cli
	MOV	EAX,DWORD [-16+EBP]
	ADD	EAX,16
	PUSH	EAX
	CALL	_fifo32_status
	POP	EDX
	TEST	EAX,EAX
	JNE	L280
	CMP	DWORD [36+EBP],0
	JE	L281
	PUSH	DWORD [-16+EBP]
	CALL	_task_sleep
	POP	EAX
L280:
	MOV	EDI,DWORD [-16+EBP]
	ADD	EDI,16
	PUSH	EDI
	CALL	_fifo32_get
	MOV	ESI,EAX
	CALL	_io_sti
	POP	EAX
	CMP	ESI,1
	JLE	L385
L283:
	CMP	ESI,2
	JE	L386
L284:
	CMP	ESI,3
	JE	L387
L285:
	CMP	ESI,4
	JE	L388
L286:
	LEA	EAX,DWORD [-256+ESI]
	CMP	ESI,255
	JG	L348
	JMP	L277
L388:
	PUSH	DWORD [16+EBX]
	CALL	_timer_cancel
	CALL	_io_cli
	MOV	EAX,DWORD [EBX]
	SUB	EAX,DWORD [-24+EBP]
	SUB	EAX,1044
	SAR	EAX,3
	IMUL	EAX,EAX,-858993459
	ADD	EAX,2024
	PUSH	EAX
	PUSH	DWORD [-28+EBP]
	CALL	_fifo32_put
	MOV	DWORD [EBX],0
	CALL	_io_sti
	ADD	ESP,12
	JMP	L286
L387:
	MOV	DWORD [12+EBX],-1
	JMP	L285
L386:
	MOV	DWORD [12+EBX],16777215
	JMP	L284
L385:
	CMP	DWORD [EBX],0
	JE	L283
	PUSH	1
	PUSH	EDI
	PUSH	DWORD [16+EBX]
	CALL	_timer_init
	PUSH	50
	PUSH	DWORD [16+EBX]
	CALL	_timer_settime
	ADD	ESP,20
	JMP	L283
L281:
	CALL	_io_sti
	MOV	DWORD [68+EBP],-1
	JMP	L243
L368:
	PUSH	DWORD [24+EBP]
	CALL	_sheet_free
	JMP	L350
L367:
	PUSH	DWORD [16+EBP]
	PUSH	DWORD [8+EBP]
	PUSH	DWORD [12+EBP]
	PUSH	DWORD [32+EBP]
	MOV	EDI,DWORD [24+EBP]
	PUSH	DWORD [36+EBP]
	AND	EDI,-2
	PUSH	EDI
	CALL	_hrb_api_linewin
	ADD	ESP,24
	TEST	DWORD [24+EBP],1
	JNE	L243
	MOV	EAX,DWORD [36+EBP]
	CMP	EAX,DWORD [12+EBP]
	JLE	L271
	MOV	EBX,DWORD [12+EBP]
	MOV	DWORD [12+EBP],EAX
	MOV	DWORD [36+EBP],EBX
L271:
	MOV	EAX,DWORD [8+EBP]
	CMP	DWORD [32+EBP],EAX
	JLE	L272
	MOV	ESI,DWORD [32+EBP]
	MOV	DWORD [32+EBP],EAX
	MOV	DWORD [8+EBP],ESI
L272:
	MOV	EAX,DWORD [8+EBP]
	INC	EAX
	PUSH	EAX
	MOV	EAX,DWORD [12+EBP]
	INC	EAX
	PUSH	EAX
	PUSH	DWORD [32+EBP]
	PUSH	DWORD [36+EBP]
L354:
	PUSH	EDI
L351:
	CALL	_sheet_refresh
L353:
	ADD	ESP,20
	JMP	L243
L366:
	PUSH	DWORD [8+EBP]
	PUSH	DWORD [12+EBP]
	PUSH	DWORD [32+EBP]
	PUSH	DWORD [36+EBP]
	PUSH	DWORD [24+EBP]
	JMP	L351
L365:
	MOV	EDI,DWORD [24+EBP]
	MOV	EAX,DWORD [8+EBP]
	AND	EDI,-2
	MOV	EDX,DWORD [36+EBP]
	IMUL	EAX,DWORD [4+EDI]
	ADD	EAX,DWORD [12+EBP]
	MOV	ECX,DWORD [EDI]
	MOV	DWORD [ECX+EAX*4],EDX
	TEST	DWORD [24+EBP],1
	JNE	L243
	MOV	EAX,DWORD [8+EBP]
	INC	EAX
	PUSH	EAX
	MOV	EAX,DWORD [12+EBP]
	INC	EAX
	PUSH	EAX
	PUSH	DWORD [8+EBP]
	PUSH	DWORD [12+EBP]
	JMP	L354
L364:
	MOV	EAX,DWORD [32+EBP]
	ADD	EAX,15
	AND	EAX,-16
	PUSH	EAX
	MOV	EAX,DWORD [24+EBP]
	ADD	EAX,DWORD [-20+EBP]
	PUSH	DWORD [36+EBP]
	PUSH	EAX
	CALL	_memman_free
	JMP	L349
L363:
	MOV	EAX,DWORD [32+EBP]
	ADD	EAX,15
	AND	EAX,-16
	PUSH	EAX
	MOV	EAX,DWORD [24+EBP]
	ADD	EAX,DWORD [-20+EBP]
	PUSH	EAX
	CALL	_memman_alloc
	MOV	DWORD [68+EBP],EAX
	JMP	L352
L362:
	MOV	EBX,DWORD [24+EBP]
	ADD	EBX,DWORD [-20+EBP]
	PUSH	EBX
	CALL	_memman_init
	AND	DWORD [32+EBP],-16
	PUSH	DWORD [32+EBP]
	PUSH	DWORD [36+EBP]
	PUSH	EBX
	CALL	_memman_free
	ADD	ESP,16
	JMP	L243
L361:
	PUSH	DWORD [8+EBP]
	PUSH	DWORD [12+EBP]
	PUSH	DWORD [32+EBP]
	MOV	EDI,DWORD [24+EBP]
	PUSH	DWORD [36+EBP]
	AND	EDI,-2
	PUSH	DWORD [16+EBP]
	PUSH	DWORD [4+EDI]
	PUSH	DWORD [EDI]
	CALL	_boxfill8
	ADD	ESP,28
	TEST	DWORD [24+EBP],1
	JNE	L243
	JMP	L272
L360:
	MOV	EAX,DWORD [16+EBP]
	MOV	EDI,DWORD [24+EBP]
	ADD	EAX,DWORD [-20+EBP]
	AND	EDI,-2
	PUSH	EAX
	PUSH	DWORD [36+EBP]
	PUSH	DWORD [8+EBP]
	PUSH	DWORD [12+EBP]
	PUSH	DWORD [4+EDI]
	PUSH	DWORD [EDI]
	CALL	_putfonts8_asc
	ADD	ESP,24
	TEST	DWORD [24+EBP],1
	JNE	L243
	MOV	ECX,DWORD [12+EBP]
	MOV	EAX,DWORD [8+EBP]
	MOV	EDX,DWORD [32+EBP]
	ADD	EAX,16
	PUSH	EAX
	LEA	EAX,DWORD [ECX+EDX*8]
	PUSH	EAX
	PUSH	DWORD [8+EBP]
	PUSH	ECX
	JMP	L354
L359:
	PUSH	DWORD [-24+EBP]
	CALL	_sheet_alloc
	MOV	ECX,DWORD [-20+EBP]
	MOV	EDX,DWORD [-16+EBP]
	MOV	EDI,EAX
	MOV	DWORD [36+EAX],EDX
	OR	DWORD [28+EAX],16
	PUSH	DWORD [36+EBP]
	MOV	EAX,DWORD [24+EBP]
	PUSH	DWORD [8+EBP]
	PUSH	DWORD [12+EBP]
	LEA	EBX,DWORD [EAX+ECX*4]
	PUSH	EBX
	PUSH	EDI
	CALL	_sheet_setbuf
	MOV	EAX,DWORD [32+EBP]
	ADD	EAX,DWORD [-20+EBP]
	PUSH	0
	PUSH	EAX
	PUSH	DWORD [8+EBP]
	PUSH	DWORD [12+EBP]
	PUSH	EBX
	MOV	EBX,2
	CALL	_make_window8
	MOV	ECX,DWORD [-24+EBP]
	MOV	EDX,DWORD [-24+EBP]
	ADD	ESP,44
	MOV	EAX,DWORD [12+EDX]
	SUB	EAX,DWORD [8+EBP]
	CDQ
	IDIV	EBX
	PUSH	EAX
	MOV	EAX,DWORD [8+ECX]
	SUB	EAX,DWORD [12+EBP]
	CDQ
	IDIV	EBX
	AND	EAX,-4
	PUSH	EAX
	PUSH	EDI
	CALL	_sheet_slide
	MOV	EBX,DWORD [-24+EBP]
	PUSH	DWORD [16+EBX]
	PUSH	EDI
	CALL	_sheet_updown
	MOV	DWORD [68+EBP],EDI
	JMP	L353
L358:
	MOV	EAX,DWORD [-16+EBP]
	ADD	EAX,48
	JMP	L241
L357:
	MOV	EAX,DWORD [24+EBP]
	ADD	EAX,DWORD [-20+EBP]
	PUSH	DWORD [32+EBP]
	PUSH	EAX
	PUSH	EBX
	CALL	_cons_putstr1
	JMP	L349
L356:
	MOV	EAX,DWORD [24+EBP]
	ADD	EAX,DWORD [-20+EBP]
	PUSH	EAX
	PUSH	EBX
	CALL	_cons_putstr0
	JMP	L352
L355:
	PUSH	1
	MOVZX	EAX,BYTE [36+EBP]
	PUSH	EAX
	PUSH	EBX
	CALL	_cons_putchar
	JMP	L349
[SECTION .data]
LC14:
	DB	0x0A,"INT 0C :",0x0A," Stack Exception.",0x0A,0x00
LC15:
	DB	"EIP = %08X",0x0A,0x00
[SECTION .text]
	GLOBAL	_inthandler0c
_inthandler0c:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	LEA	EBX,DWORD [-44+EBP]
	SUB	ESP,32
	CALL	_task_now
	MOV	ESI,EAX
	MOV	EDI,DWORD [164+EAX]
	ADD	ESI,48
	PUSH	LC14
	PUSH	EDI
	CALL	_cons_putstr0
	MOV	EAX,DWORD [8+EBP]
	PUSH	DWORD [44+EAX]
	PUSH	LC15
	PUSH	EBX
	CALL	_sprintf
	PUSH	EBX
	PUSH	EDI
	CALL	_cons_putstr0
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	MOV	EAX,ESI
	POP	ESI
	POP	EDI
	POP	EBP
	RET
[SECTION .data]
LC16:
	DB	0x0A,"INT 0D :",0x0A," General Protected Exception.",0x0A,0x00
[SECTION .text]
	GLOBAL	_inthandler0d
_inthandler0d:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	LEA	EBX,DWORD [-44+EBP]
	SUB	ESP,32
	CALL	_task_now
	MOV	ESI,EAX
	MOV	EDI,DWORD [164+EAX]
	ADD	ESI,48
	PUSH	LC16
	PUSH	EDI
	CALL	_cons_putstr0
	MOV	EAX,DWORD [8+EBP]
	PUSH	DWORD [44+EAX]
	PUSH	LC15
	PUSH	EBX
	CALL	_sprintf
	PUSH	EBX
	PUSH	EDI
	CALL	_cons_putstr0
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	MOV	EAX,ESI
	POP	ESI
	POP	EDI
	POP	EBP
	RET
	GLOBAL	_hrb_api_linewin
_hrb_api_linewin:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	PUSH	ESI
	PUSH	ESI
	MOV	EDI,DWORD [12+EBP]
	MOV	EAX,DWORD [20+EBP]
	MOV	ECX,EDI
	MOV	EDX,DWORD [24+EBP]
	SAL	ECX,10
	MOV	ESI,EDX
	MOV	DWORD [-16+EBP],ECX
	MOV	EBX,EAX
	MOV	ECX,DWORD [16+EBP]
	SUB	ESI,DWORD [16+EBP]
	SAL	ECX,10
	SUB	EBX,EDI
	MOV	DWORD [-20+EBP],ECX
	JS	L413
L392:
	TEST	ESI,ESI
	JS	L414
L393:
	CMP	EBX,ESI
	JL	L394
	LEA	ECX,DWORD [1+EBX]
	CMP	EDI,EAX
	MOV	EBX,-1024
	JG	L396
	MOV	EBX,1024
L396:
	CMP	DWORD [16+EBP],EDX
	JG	L397
	SUB	EDX,DWORD [16+EBP]
	INC	EDX
L412:
	SAL	EDX,10
	MOV	EAX,EDX
	CDQ
	IDIV	ECX
	MOV	ESI,EAX
L399:
	TEST	ECX,ECX
	JLE	L410
	MOV	EDX,DWORD [8+EBP]
	MOV	EDI,DWORD [EDX]
L408:
	MOV	EAX,DWORD [-20+EBP]
	MOV	EDX,DWORD [8+EBP]
	SAR	EAX,10
	ADD	DWORD [-20+EBP],ESI
	IMUL	EAX,DWORD [4+EDX]
	MOV	EDX,DWORD [-16+EBP]
	ADD	DWORD [-16+EBP],EBX
	SAR	EDX,10
	ADD	EAX,EDX
	MOV	EDX,DWORD [28+EBP]
	DEC	ECX
	MOV	DWORD [EDI+EAX*4],EDX
	JNE	L408
L410:
	POP	ECX
	POP	EBX
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L397:
	SUB	EDX,DWORD [16+EBP]
	DEC	EDX
	JMP	L412
L394:
	LEA	ECX,DWORD [1+ESI]
	CMP	DWORD [16+EBP],EDX
	MOV	ESI,-1024
	JG	L401
	MOV	ESI,1024
L401:
	CMP	EDI,EAX
	JG	L402
	SUB	EAX,EDI
	LEA	EDX,DWORD [1+EAX]
L411:
	SAL	EDX,10
	MOV	EAX,EDX
	CDQ
	IDIV	ECX
	MOV	EBX,EAX
	JMP	L399
L402:
	SUB	EAX,EDI
	LEA	EDX,DWORD [-1+EAX]
	JMP	L411
L414:
	NEG	ESI
	JMP	L393
L413:
	NEG	EBX
	JMP	L392
